package com.ruoyi.system.service;

import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.common.core.domain.AjaxResult;

import java.io.IOException;
import java.util.Map;

/**
 * @ProjectName: back
 * @Package: com.ruoyi.system.service
 * @ClassName: WeChatPayService
 * @Author: haiyue
 * @Description: 微信支付
 * @Date: 2025/6/4 下午 12:42:36
 * @Version: 1.0
 */
public interface WeChatPayService {

    /**
     * 扫码支付
     * @Date 上午 9:41:38 2025/6/5
     * @param outTradeNo
     * @param totalAmount
     * @param description
     * @param notifyUrl
     * @return 返回支付二维码地址
     **/
    public String createNativePayOrder(String outTradeNo, int totalAmount, String description, String notifyUrl);


    /**
     * @Author haiyue
     * @Description
     * @Date 下午 7:10:23 2025/6/5
     * @param outTradeNo
     * @param totalAmount
     * @param description
     * @param openId
     * @return 小程序预支付
     **/
    public Map<String,String> createAppletPrepayOrder(String outTradeNo, int totalAmount, String description,String notifyUrl, String openId) throws Exception;
    /**
     * 查询微信订单
     * @Date 下午 6:33:35 2025/6/9
     * @param transactionId
     * @return 结果
     **/
    public AjaxResult selectWxOrderDetail(String transactionId) throws Exception;

}
